import { ApiOperation, ApiResponse, ApiSecurity, ApiTags } from '@nestjs/swagger';
import { Body, Controller, Get, Post, Query } from '@nestjs/common';
import { ADMIN_PREFIX } from 'src/modules/admin/admin.constants';
import { SysFontlistService } from './fontlist.service';
import { FontlistDto } from './fontlist.dto';
import FontList from 'src/entities/admin/sys-font-list.entity';
import { Authorize } from '../../core/decorators/authorize.decorator';

@ApiSecurity(ADMIN_PREFIX)
@ApiTags('分类模块')
@Controller('font')
export class SysFontlistController {
  constructor(private readonly service: SysFontlistService) {}
  /**
   * 获取所有标签
   */
  @ApiOperation({
    summary: '获取所有字体列表',
  })
  @ApiResponse({ status: 200, description: 'list' })
  @Get('list')
  @Authorize()
  findAll(@Query() queryParams: FontlistDto): Promise<FontList[]> {
    return this.service.findAll(queryParams);
  }
}
